/*
 * Created by Jaren at 2021/10/29 10:30
 */
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

class Prompt {
  static void showMessageDialog(String content) {
    Get.defaultDialog(content: Text(content));
  }

  static Future showDialog(String content, VoidCallback? onConfirm) {
    return Get.defaultDialog(
        content: Text(content),
        textConfirm: "Next",
        onConfirm: () {
          Get.back();
          if (onConfirm != null) onConfirm();
        },
        barrierDismissible: true);
  }

  static void showToast(String content) {
    Get.snackbar('Success', 'Device has connected!');
  }
}
